/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cip.esymons.general.be;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Lizardo
 */
@Entity
@Table(name = "gen_igv")
//@NamedQueries({@NamedQuery(name = "Igv.findAll", query = "SELECT i FROM Igv i"), @NamedQuery(name = "Igv.findByIgvCodigo", query = "SELECT i FROM Igv i WHERE i.igvCodigo = :igvCodigo"), @NamedQuery(name = "Igv.findByIgvValor", query = "SELECT i FROM Igv i WHERE i.igvValor = :igvValor"), @NamedQuery(name = "Igv.findByIgvfechaIncorporacion", query = "SELECT i FROM Igv i WHERE i.igvfechaIncorporacion = :igvfechaIncorporacion"), @NamedQuery(name = "Igv.findByIgvHabilitado", query = "SELECT i FROM Igv i WHERE i.igvHabilitado = :igvHabilitado")})
public class Igv implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "igv_codigo")
    private Integer igvCodigo;
    @Basic(optional = false)
    @Column(name = "igv_valor")
    private Double igvValor;
    @Basic(optional = false)
    @Column(name = "igv_fechaIncorporacion")
    @Temporal(TemporalType.DATE)
    private Date igvfechaIncorporacion;
    @Basic(optional = false)
    @Column(name = "igv_habilitado")
    private Boolean igvHabilitado;

    public Igv() {
    }

    public Igv(Integer igvCodigo) {
        this.igvCodigo = igvCodigo;
    }

    public Igv(Integer igvCodigo, Double igvValor, Date igvfechaIncorporacion, Boolean igvHabilitado) {
        this.igvCodigo = igvCodigo;
        this.igvValor = igvValor;
        this.igvfechaIncorporacion = igvfechaIncorporacion;
        this.igvHabilitado = igvHabilitado;
    }

    public Integer getIgvCodigo() {
        return igvCodigo;
    }

    public void setIgvCodigo(Integer igvCodigo) {
        this.igvCodigo = igvCodigo;
    }

    public Double getIgvValor() {
        return igvValor;
    }

    public void setIgvValor(Double igvValor) {
        this.igvValor = igvValor;
    }

    public Date getIgvfechaIncorporacion() {
        return igvfechaIncorporacion;
    }

    public void setIgvfechaIncorporacion(Date igvfechaIncorporacion) {
        this.igvfechaIncorporacion = igvfechaIncorporacion;
    }

    public Boolean getIgvHabilitado() {
        return igvHabilitado;
    }

    public void setIgvHabilitado(Boolean igvHabilitado) {
        this.igvHabilitado = igvHabilitado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (igvCodigo != null ? igvCodigo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Igv)) {
            return false;
        }
        Igv other = (Igv) object;
        if ((this.igvCodigo == null && other.igvCodigo != null) || (this.igvCodigo != null && !this.igvCodigo.equals(other.igvCodigo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.cip.esymons.general.be.Igv[igvCodigo=" + igvCodigo + "]";
    }

}
